1. Technical Field
The present invention relates to an image processing device and method, and a storage medium storing a program, and more particularly relates to an image processing device which is provided with an image processing section formed by connecting individual modules in a pipeline form or a directed acyclic graph form, such that buffer modules are connected at least one of preceding and following image processing modules, and an image processing method and a storage medium storing an image processing program, which are for causing a computer to function as the image processing device.
2. Related Art
In an image processing device which carries out image processing on inputted image data, a DTP (desktop publishing) system which is capable of handling images, a printing system which records an image represented by inputted image data on a recording material, or the like, various kinds of image processing are carried out on the inputted image data, such as magnification/reduction, rotation, affine transformations, color conversions, filter processing, image synthesis and so forth. In such devices and systems, in cases in which categories of inputted image data and contents (details), sequencing, parameters and the like of image processing to be applied to the image data are fixed, the image processing can be carried out by specifically designed hardware. However, in a case in which different kinds of image data with, for example, different color spaces, bit counts per pixel or the like are to be inputted and/or the contents, sequencing and parameters and the like of the image processing are to be variously altered, a structure in which the image processing to be executed can be more flexibly altered is needed.
For execution of image processing, as processing systems for a case in which plural image processing modules are combined to formulate an image processing section and carry out desired image processing, a parallel processing system and a sequential processing system can be considered. The parallel processing system carries out image processing at the individual image processing modules in parallel, and the sequential processing system carries out image processing continually at single image processing modules and arranges a sequence of image processing modules which are to carry out the image processing. Of these systems, the parallel processing system is capable of a higher processing speed than the sequential processing system in an operating environment in which resources such as, for example, memory and the like are comparatively plentiful. On the other hand, the sequential processing system operates stably in an operating environment in which resources such as memory and the like are comparatively scarce. Because these processing methods have characteristics which differ from one another in this manner, it is desirable to be able to switch between the processing systems in consideration of various factors, such as configuration of the processing device, operation environment, interaction with other application programs that are being executed at the same time, and the like.
Enabling switching between parallel processing and sequential processing can be realized by, for example, respectively preparing a program for parallel processing and a program for sequential processing. However, in such a case, a workload of development of a program for causing a computer to function as an image processing device will increase. In particular, of the above-mentioned programs, for programs which functions as image processing modules, changes and additions, such as improvements of previous algorithms, additions of image processing modules which perform new image processes and the like, are performed with a comparatively high frequency. However, the respective preparation of a program for parallel processing and a program for sequential processing as programs of an image processing module leads to a very large increase in the workload of program development.
Making a program which is common for parallel processing and for sequential processing can be considered. However, parallel processing and sequential processing differ in that exclusive access control is not required for sequential processing but is necessary for parallel processing. Consequently, when a single common program is made for parallel processing and for sequential processing, unnecessary exclusive access control is applied to the sequential processing, and hence problems arise with reductions in processing speed, wasteful usage of resources and the like. Furthermore, with the parallel processing system, individual image processing modules may be operated as separate threads, and it is possible to rearrange execution priorities of the threads. However, in a case in which a program is a single common program for parallel processing and for sequential processing, it is difficult to perform control of execution priorities as described above during parallel processing.